package com.example.consumerrabbitmq.listener;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @description: 监听
 * @author: WangBlue
 * @create: 2023-11-24 21:43
 **/


@Component
public class RabbitMQListener {
    @RabbitListener(queues = "boot_quque")
    public void ListenerQueue(Message message){
        System.out.println("boot_queue : " + new String(message.getBody()));
    }
}


